package com.tledu.day62springboot.controller;

import com.tledu.day62springboot.domain.Book;
import com.tledu.day62springboot.service.IBookService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author cyrus
 */
@RestController
@RequestMapping("/book")
@AllArgsConstructor
public class BookController {
    private final IBookService bookService;

    @PostMapping("/findAll")
    public List<Book> findAll(@RequestBody Book book) {
        return bookService.selectList(book);
    }
}
